<template>
	<view class="center">
		<hea-ders title="打印预览">
			<image class="left" slot='left' src="@/static/images/arrow_left.png" mode="widthFix" @click="back" ></image>
			<view class="ima" slot='official' @click="Sizer">
				<text>清除</text>
			</view>
		</hea-ders>
		<text class="obtain">收款单</text>
		<view class="titlek">
			<view class="sun">
				<view>===================</view>
				<view class="number">
					<text>单据编号：WMK-20200610-003</text>
					<text>客户名称：12345</text>
					<text>经手人：18511111111</text>
				</view>
				<view>===================</view>
			</view>
		</view>
		
		<view class="info">
			---------------------	
			<text>本次结算合计：690元</text>
			<text>收款金额：690元</text>
			<text>收款账户：库存现金</text>
			<text>收款金额2：0元</text>
			<text>收款账户0：未选择</text>
			<text>单据日期：2020-06-10</text>
		</view>
		<view class="uploadim">
			<image src="../../../../static/images/s32.png" mode="widthFix"></image>
		</view>
		<button class="btn" type="primary">开始打印</button>
	</view>
</template>

<script>
	import heaDers from '@/pages/header/header.vue'
	export default {
		components:{
			heaDers
		},
		data() {
			return {
				
			}
		},
		methods: {
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			upload(){
				uni.chooseImage({
				    success: (chooseImageRes) => {
				        const tempFilePaths = chooseImageRes.tempFilePaths;
				        uni.uploadFile({
				            url: 'https://www.example.com/upload', //仅为示例，非真实的接口地址
				            filePath: tempFilePaths[0],
				            name: 'file',
				            formData: {
				                'user': 'test'
				            },
				            success: (uploadFileRes) => {
				                console.log(uploadFileRes.data);
				            }
				        });
				    }
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
.center{
	width: 100%;
	height: 100vh;
	box-sizing: border-box;
	background: rgba(245, 245, 245, 1);
	overflow-y: scroll;
	.title {
		width: 100%;
		height: 88rpx;
		padding: 0 30rpx;
		box-sizing: border-box;
		background-color: rgba(36, 153, 246, 1);
		display: flex;
		align-items: center;
		.a_box {
			flex: 1;
			image{
				width: 22rpx ;	
			}
		}
	
		text {
			flex: 1.2;
			font-size: 36rpx;
			color: #fff;
			font-weight: 400;
			font-family: PingFang SC;
		}
		.left{
			width: 20rpx;
			height: 40rpx;
		}
		.ima {
			text{
				flex: 1;
				font-size:30rpx;
				font-family:PingFang SC;
				font-weight:500;
				line-height:40rpx;
				color:rgba(255,255,255,1);
				opacity:1;
				
			}
			image {
				width: 40rpx;
				margin-left: 5rpx;
			}
			
		}
	}
	.obtain{
	margin-top: 10%;
	margin-bottom: 2%;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	display: inline-block;
		font-size:36rpx;
		font-family:PingFang SC;
		font-weight:400;
		line-height:50rpx;
		color:rgba(66,66,66,1);
		opacity:1;	
	
	}
	.titlek{
		.sun{
			padding-left: 60rpx;
			.number{
				display: flex;
				flex-direction: column;
				text{
					font-size:35rpx;
					font-family:PingFang SC;
					font-weight:400;
					line-height:33rpx;
					color:rgba(66,66,66,1);
					opacity:1;
					margin-bottom: 30rpx;
				}
				text:first-child{
					margin-top: 30rpx;
				}
			}
		}
	}
	.info{
		padding-left: 60rpx;
		display: flex;
		flex-direction: column;
		text{
			font-size:30rpx;
			font-family:PingFang SC;
			font-weight:400;
			line-height:33rpx;
			color:rgba(66,66,66,1);
			opacity:1;
			margin-bottom: 30rpx;
		}
	}
	.uploadim{
		margin: 0 auto;
		width: 200rpx;
		image{
			width: 200rpx;
		}
	}
	.btn{
		width: 100%;
		box-sizing: border-box;
		border-radius: 0;
		position: fixed;
		left: 0;
		bottom: 0;
	}
}
</style>
